home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / other / dopus412-gpl / dopus_print / print.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  3KB  |  134 lines

  1. /*
  2.  
  3. Directory Opus 4
  4. Original GPL release version 4.12
  5. Copyright 1993-2000 Jonathan Potter
  6.  
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License
  9. as published by the Free Software Foundation; either version 2
  10. of the License, or (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. All users of Directory Opus 4 (including versions distributed
  22. under the GPL) are entitled to upgrade to the latest version of
  23. Directory Opus version 5 at a reduced price. Please see
  24. http://www.gpsoft.com.au for more information.
  25.  
  26. The release of Directory Opus 4 under the GPL in NO WAY affects
  27. the existing commercial status of Directory Opus 5.
  28.  
  29. */
  30.  
  31. #include <fctype.h>
  32. #include <string.h>
  33. #include <stdlib.h>
  34. #include <stdarg.h>
  35. #include <exec/types.h>
  36. #include <exec/memory.h>
  37. #include <exec/execbase.h>
  38. #include <intuition/intuitionbase.h>
  39. #include <intuition/sghooks.h>
  40. #include <workbench/workbench.h>
  41. #include <workbench/startup.h>
  42. #include <devices/printer.h>
  43. #include <devices/prtbase.h>
  44. #include <datatypes/datatypesclass.h>
  45. #include <proto/all.h>
  46.  
  47. #include "dopusbase.h"
  48. #include "dopuspragmas.h"
  49. #include "requesters.h"
  50. #include "dopusmessage.h"
  51. #include "stringdata.h"
  52. #include "printstrings.h"
  53.  
  54. extern struct DOpusBase *DOpusBase;
  55. extern struct IntuitionBase *IntuitionBase;
  56. extern struct GfxBase *GfxBase;
  57. extern struct Library *IconBase;
  58. extern struct ExecBase *SysBase;
  59. extern struct DosLibrary *DOSBase;
  60. extern struct Library *WorkbenchBase;
  61. extern struct Library *PPBase;
  62.  
  63. struct Directory {
  64.     struct Directory *last,*next;
  65.     char name[32];
  66.     int type;
  67.     int size;
  68.     int subtype;
  69.     int protection;
  70.     char *comment;
  71.     char *dispstr;
  72.     char protbuf[12],datebuf[20];
  73.     int selected;
  74.     char *description;
  75.     int userdata,userdata2;
  76.     struct DateStamp date;
  77. };
  78.  
  79. #define PRINTFLAG_EJECT    1
  80. #define PRINTFLAG_FILE     2
  81.  
  82. #define HEADFOOTFLAG_TITLE 1
  83. #define HEADFOOTFLAG_DATE  2
  84. #define HEADFOOTFLAG_PAGE  4
  85.  
  86. #define PITCH_PICA         0
  87. #define PITCH_ELITE        1
  88. #define PITCH_FINE         2
  89.  
  90. #define PITCH_COUNT        3
  91.  
  92. #define STYLE_NORMAL       0
  93. #define STYLE_BOLD         1
  94. #define STYLE_ITALICS      2
  95. #define STYLE_UNDERLINED   3
  96. #define STYLE_DOUBLESTRIKE 4
  97. #define STYLE_SHADOW       5
  98.  
  99. #define STYLE_COUNT        6
  100.  
  101. #define QUALITY_DRAFT      0
  102. #define QUALITY_NLQ        1
  103.  
  104. #define HEADER             0
  105. #define FOOTER             1
  106.  
  107. typedef struct HeadFootData {
  108.     char text_style;
  109.     char headfoot_flags;
  110.     char headfoot_title[40];
  111. } HeaderFooter;
  112.  
  113. typedef struct MyPrinterData {
  114.     USHORT top_margin;
  115.     USHORT bottom_margin;
  116.     USHORT left_margin;
  117.     USHORT right_margin;
  118.     char tab_size;
  119.     char print_pitch;
  120.     char text_quality;
  121.     char print_flags;
  122.     char output_file[256];
  123.     HeaderFooter headfoot[2];
  124. } PrintData;
  125.  
  126. #define DOUBLESTRIKE_OFF "\x1b[3\"z"
  127. #define SHADOW_OFF       "\x1b[5\"z"
  128.  
  129. extern struct DefaultString default_strings[];
  130.  
  131. #define STRING_VERSION 1
  132.  
  133. #include "functions.h"
  134.